﻿<%@page contentType="text/vnd.wap.wml; charset=utf-8"%>
<%@ page import="business.*"%> 
<%@ page import="java.util.*"%>
<%@ page import="com.marssoft.thief.tools.HttpRequest"%> 
<%@ page import="com.marssoft.thief.tools.RegExp"%> 
<%@ page import="java.net.MalformedURLException"%>   
<%@ page import="java.io.*"%>  
<%@ page import="java.net.URL"%>   
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org//DTD//wml_1.1.xml"> 
<WML> 
<%
            String Urlhead = "http://images.mh.xunlei.com/";
            String url = "http://v.vv0vv.com/tdcm/recommend.jsp?tdch=1184&projid=1016&mode=query&count=5";
			//url = "http://v.vv0vv.com/tdcm/recommend.jsp?tdch=1184&projid=1016&mode=query&count=5"; 
			HttpRequest hr = new HttpRequest();     
			String source;
			String ts = "";// 待转换内容
			List<String> list = new ArrayList<String>();   
			List<String> list1 = new ArrayList<String>();
			List<String> list2 = new ArrayList<String>();
			source = hr.doRequest(url, "");
			ArrayList<String> tagList = RegExp.getStrs(source,
			"(?<=\\<link url=\")[\\s\\S]*?(?=\")");
			
			String tags="";
			for (String tag : tagList)  {
				tags =  RegExp.getString(tag,
				"(?<=\\<link url=\")[\\s\\S]*?(?=\")");  
		//		System.out.println(tag);
				list.add(tag);    
			}
			
			ArrayList<String> tagList1 =RegExp.getStrs(source,
			"(?<=picurl=\")[\\s\\S]*?(?=\">)");  
			String tags1="";
			for (String tag1 : tagList1)  {
				tags1 =  RegExp.getString(tag1,
				"(?<=picurl=\")[\\s\\S]*?(?=\">)");  
				
			//	System.out.println("-----"+tag1.trim()+"|");
				list1.add(tag1.trim());
			}
			ArrayList<String> tagList2 =RegExp.getStrs(source,
			"(?<=\">)[\\s\\S]*?(?=\\</link>)");
			String tags2="";
			for (String tag2 : tagList2)  {
				tags1 =  RegExp.getString(tag2,
				"(?<=\\<link url=\")[\\s\\S]*?(?=\\</link>)");
				
			//	System.out.println("********"+tag2.trim()+"||");
				list2.add(tag2.trim());
			}   
          String purl = request.getParameter("purl");
          
			System.out.println("%%%%%%"+list2.get(1));                     
			 %>
<CARD id="card1" title="视频">      
<p align="left">
   更多视频：<br />
   <img src="<%=list1.get(1) %>" /><br />
    <a href="<%=list.get(1)%>"><%=list2.get(1) %></a><br />                          
      <%if(purl==null){ %>      
<a href="/game3.0/">返回</a>      
<%} else{%>
<a href="/game3.0/<%=purl%>.html">返回</a>     
<%} %>
    <br />         
</p>
</CARD> 
</WML>